package model;

public class SUV extends Car{
    private boolean isFourWheelDrive;

    public SUV() {
    }

    public SUV(String id, String brand, double priceDay,boolean isElectric,boolean isRented,boolean isFourWheelDrive) {
        super(id, brand, priceDay, isElectric, isRented);
        this.isFourWheelDrive = isFourWheelDrive;

    }

    /**
     * 获取
     * @return isFourWheelDrive
     */
    public boolean isIsFourWheelDrive() {
        return isFourWheelDrive;
    }

    /**
     * 设置
     * @param isFourWheelDrive
     */
    public void setIsFourWheelDrive(boolean isFourWheelDrive) {
        this.isFourWheelDrive = isFourWheelDrive;
    }
    public String toString() {
        return "SUV{isFourWheelDrive = " + isFourWheelDrive + "}";
    }
    @Override
    public double TotalPrice(int day) {
        return priceDay * day * (isFourWheelDrive ? 1.2 : 1);//四驱车租金加价百分之20
    }
}
